<?php
/**
 * @subpackage	mod_sp_date
 * @copyright	Copyright (C) 2010 - 2014 JoomShaper. All rights reserved.
 * @license		GNU General Public License version 2 or later; 
 */

// no direct access
defined('_JEXEC') or die;
?>

<div class="sp-date <?php echo $params->get('moduleclass_sfx') ?>">
	<?php
	if ($params->get('show_date') == 1) {
		echo JHtml::_('date', JFactory::getDate(), JText::_('DATE_FORMAT_LC1'));

	}

	if ($params->get('show_signin') == 1) {
		$user = JFactory::getUser();
		if($user->id != 0){
			echo " | <a href='" . JRoute::_('index.php?option=com_users&view=profile&layout=edit') . "'>".JText::_('SP_EDIT_PROFILE')."</a> | <a href='" . JRoute::_('index.php?option=com_users&view=login') . "'>".JText::_('SP_LOGOUT')."</a>";
		}
		else{
			echo " | <a href='" . JRoute::_('index.php?option=com_users&view=login') . "'>".JText::_('SP_LOGIN')."</a>";
		}
	}
	?>
</div>